/*!
 * Fork URL 1.0 (http://forkurl.com)
 * Simplified BSD License (BSD)
 * Copyright (c) 2014, Tom Wased
 * All rights reserved.
 */


 function forkurl(url,callback)
 {
	$.ajax({
		async:false,
		dataType: 'json',
		method:"POST",
		url:"http://www.forkurl.com/API.php",
		data:{url:url},
		success:function(msg)
		{
			callback(msg.data);
		}

	});
 }


 /*
	A : Call the method as below.Please note that your urls are public by default, please login to make private urls(awaited).
	var url = "your large url";
	forkurl(url,function(tinyurl)
	{
		alert(tinyurl);
	});
	
 */